#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
    int n;
    while (~scanf("%d", &n)) {
        int i1 = 1;
        int i2 = 1;
        int ret = 1;
        for (int i = 2; i < n; ++i)
        {
            ret = i1 + i2;
            i1 = i2;
            i2 = ret;
        }
        printf("%d\n", ret);
    } return 0;
}